<template>
  <div class="menu">
    <el-menu
      :default-active="activeIndex2"
      class="el-menu-demo"
      mode="horizontal"
      @select="handleSelect"
      background-color="#2C3E50"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item index="A">知识检索</el-menu-item>
      <el-menu-item index="B">知识抽取</el-menu-item>
    </el-menu>
  </div>
</template>

<script>
export default {
  name: "menu",
  data () {
    return {
      activeIndex2: "A"
    };
  },
  methods: {
    handleSelect (key, keyPath) {
    //   console.log(key, keyPath)
      console.log(key)
      console.log(keyPath)
      this.$emit('event', key)
    }
  }
};
</script>

<style lang='scss' scoped>
    .menu {
        width: 100%;
        margin: 0 auto;
        background-color: #2C3E50;
        padding: 0;
        height: 60px;
        /* text-align: center; */
        /* display: flex; */
        /* align-items: center; */
        /* justify-content: center; */
        /* background-color: red; */
    }
    .el-menu-demo {
        margin: 0;
        display: inline-block;
    }
</style>
